Skip to content

wsargent/radiator

 
 

Repository files navigation

Radiator
========
Radiator is a Ruby on Rails application that exposes a web service for radiating information to devices like the Betabrite Prism.

Install Everything
====================

Debian:
  Make sure you have Rubygems 1.3.7 installed (use the one from rubygems.org NOT the Debian one)
  Run the ./linux_dependencies.sh script (after reviewing, of course)

Mac:
  Install MacPorts
  sudo port install ruby (MacPorts Ruby is much better)
  sudo port install postgresql
  sudo port install libusb-legacy (compat?)
  Make sure you have RubyGems 1.3.7 or later

Setup Project
===================

  sudo gem install bundler
  bundle install 

Set up the Database
===================

  sudo su - postgres (as needed)
  createdb radiator_production
  createuser radiator -P (use "radiator" as the password)

Run Migrations
===================

  sudo RAILS_ENV=production rake db:migrate 

Running It
====================

  Plug in the betabrite

  # Start up the server (creates jobs)
  ./script/start_radiator

  # To run the workers that run on the jobs
  ./script/start_delayed_job

Admin
====================

  Go to http://localhost:3000/admin for the Typus interface.

Extending It
====================

The core of Radiator is the messages table.  Anything in the messages table gets read
according to what has been last displayed, so that the oldest messages get shown first.

Messages get created by message sources.  Currently, there is only one message source,
which queries Toodledo (an online todo service) and creates new messages from it.
However, Radiator does not care where messages come from and you can add your own
messages in Typus.

The BetaBriteUpdater class is responsible for talking to the USB display and getting new
 messages.  This class uses rufus-scheduler to update the display (which is done every 5
 seconds) and call the datasources for new messages (every minute).  The BetabriteUpdater
 will clear the table every time it updates for new messages, but it does not "blank" the
 Betabrite display.  This means that if there are no new messages, the last displayed message
 just keeps displaying until a new one does appear.  It then creates jobs that are picked up by
 the worker process running in the background -- this prevents long running processes from
 locking up the web server.

There is a scaffold for messages that can be used as a REST API, so /messages.xml will give
you what you expect.

Device Compatibility
====================
This version currently supports the Adaptive Technologies BETABrite Prism USB sign.  In theory it should work with any other Adaptive Technologies USB LED sign that supports the Alpha protocol.

About

WebService API for USB Betabrite and continuous integration build status information radiator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 82.3%
  • JavaScript 17.2%
  • Shell 0.5%